package com.itcast.controller;

import com.itcast.entity.TArticle;
import com.itcast.service.TArticleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author feng js
 */
@RestController
public class ArticleController {
    @Autowired
    TArticleService tArticleService;
    @GetMapping("article")
    public List<TArticle> findAll() {
        List<TArticle> all = tArticleService.findAll();
        return all;
    }

}
